<div id="viewer-container"></div>
<script>
  CTS.ready(() => {
    let viewer = new CTS.Viewer('viewer-container') //初始化场景
    let lights = new CTS.Lights(viewer)
    let directionalLight = lights.addDirectionalLight([-20, 20, -200])
    directionalLight.setOption({
      intensity: 5,
      mapSize: 1024
    })
    viewer.camera.position.set(13, 13, 13) //设置相机位置
    let modeloader = new CTS.ModelLoder(viewer)
    modeloader.loadModelToScene('resources/model/factory.glb', model => {
      const object = ['mesh_19', 'mesh_17', 'mesh_18']
      model.openReceiveShadow(object) // 数组中的名称包含
      model.openCastShadow(object) // 数组中的名称
    })
  })
</script>
